package com.xy.job.core.common

interface IDict {
    fun displayNameI18nKey(): String {
        if (this is Enum<*>) {
            return "${this::class.simpleName}.${this.name}"
        } else {
            throw NotImplementedError()
        }
    }

    fun displayNameDefaultValue(): String {
        if (this is Enum<*>) {
            return this.name
        } else {
            throw NotImplementedError()
        }
    }

    fun key(): String {
        if (this is Enum<*>) {
            return this.name
        } else {
            throw NotImplementedError()
        }
    }
}